<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/template.xhtml"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	>
	<ui:define name="content">
	
		<ui:include src="/includes/menu.xhtml"></ui:include>
	
		<h1><h:outputText value="Můj Profil" /></h1>

		<ui:include src="/includes/menuTierTwo.xhtml"></ui:include>
	
		<h2><h:outputText value="Uživatelé" /></h2>
		<h:outputText value="Administrace registrovaných uživatelů:" />
	
		<h:form>
		<rich:dataTable value="#{userAdministrationBean.users}" var="user">
			<rich:column>
				<f:facet name="header">
					<h:outputText value="id" />
				</f:facet>			
				<h:outputText value="#{user.id}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="Nick" />
				</f:facet>	
				<h:outputText value="#{user.nick}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="Name" />
				</f:facet>	
				<h:outputText value="#{user.name}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="Surname" />
				</f:facet>	
				<h:outputText value="#{user.surname}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="City" />
				</f:facet>	
				<h:outputText value="#{user.city}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="Mail" />
				</f:facet>	
				<h:outputText value="#{user.mail}" />
			</rich:column>	
			<rich:column>
				<f:facet name="header">
					<h:outputText value="Delete" />
				</f:facet>	
				<h:form>
					<a4j:commandButton value="delete" action="#{userAdministrationBean.deleteUser(user.id)}" />
				</h:form>	
			</rich:column>
			
		</rich:dataTable>
		</h:form>
	</ui:define>
</ui:composition>